
#include "AutomatVar1.h"
#include <iostream>

AutomatVar1::AutomatVar1(IScanner* scanner) :
    currentState(State0::makeState()),
    scanner(scanner)
{
}

AutomatVar1::~AutomatVar1(void)
{
    delete currentState;
}

void AutomatVar1::readChar(char c)
{
    currentState->read(c, this);
}

void AutomatVar1::setCurrentState(IState* state)
{
    currentState = state;
}

void AutomatVar1::mkToken(TType type, long long value)
{
    scanner->mkToken(type, value);
}

void AutomatVar1::ungetChar(int times/* = 0*/)
{
    scanner->ungetChar(times);
}

void AutomatVar1::stop()
{
    scanner->stop();
}

void AutomatVar1::error()
{
    printf("AutomatVar1::error() -> EXITING!");
    exit(1);
}
